package com.dfrz.ch05.task;

/**
 * 作者：wangmaokang
 * 日期: 2021/4/12 14:11
 * 描述:
 */
public class ForWhileTest {
    public static void main(String[] args) {
        int sum=0;

        for (int j=1;j<=100;j++){
             sum+=j;
             //sum=sum+j;
        }

        sum=0;
        int i=1;
        while (i<=100){
            sum+=i;
            i++;
        }

        sum=0;
         i=1;
         do {
             sum+=i;
             i++;
         }while (i<=100);

    }
}
